Skip to content

chore(git): align session hook output with upstream v2.1.84–v2.1.126#37

Merged
cblecker merged 1 commit intomainfrom
chore/git-upstream-alignment-v2.1.126
May 2, 2026
Merged

chore(git): align session hook output with upstream v2.1.84–v2.1.126#37
cblecker merged 1 commit intomainfrom
chore/git-upstream-alignment-v2.1.126

Conversation

@cblecker
Copy link
Copy Markdown
Owner

@cblecker cblecker commented May 2, 2026

Summary

  • Moves the repeated parallel-execution batching preamble from inline in steps 1 and 3 (4 total locations) into a single standalone paragraph before the Git Safety Protocol, removing ~120 words of redundancy and matching upstream v2.1.84+ structure
  • Updates deprecated TodoWrite tool references to TaskCreate, TaskUpdate, or Agent in both the commit and PR sections
  • Adds missing "in parallel" to commit step 3 (already present in PR step 3 and upstream)
  • Documents the "NEVER commit directly to mainline" safety rule in git/CLAUDE.md's differences list; bumps plugin version to 1.3.0

An Opus subagent did a full line-by-line comparison against the upstream Piebald-AI/claude-code-system-prompts files and confirmed all differences fall into the documented expected categories — no unexpected drift found.

Test plan

  • Run bash git/scripts/git-instructions.sh and verify the preamble paragraph appears once before "Git Safety Protocol:", steps 1 and 3 in both sections start with Run the following..., and tool names read TaskCreate, TaskUpdate, or Agent
  • Run claude plugin validate ./git — expect ✔ Validation passed
  • Run npx markdownlint-cli2 --config .markdownlint-cli2.jsonc "git/**/*.md" — expect 0 errors
  • Verify git/.claude-plugin/plugin.json version is 1.3.0

Summary by CodeRabbit

  • Chores

    • Version updated to 1.3.0
  • Documentation

    • Added safety rule preventing direct commits to mainline branch
    • Refined instructional text for parallel command execution workflows and tool usage guidelines

Consolidates repeated batching preamble into a single paragraph, updates
deprecated TodoWrite tool references to TaskCreate/TaskUpdate, and adds
missing "in parallel" to commit step 3 to match upstream wording.

Assisted-by: Claude:claude-sonnet-4-6[1m]
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 2, 2026

📝 Walkthrough

Walkthrough

Version 1.3.0 of the Git plugin is released with a new safety constraint preventing direct commits to mainline, updated instruction text for parallel bash execution guidance, and modified tool prohibitions replacing TodoWrite with TaskCreate and TaskUpdate in both commit and pull request workflows.

Changes

Git Plugin v1.3.0 Release

Layer / File(s) Summary
Manifest Version
git/.claude-plugin/plugin.json
Plugin version incremented from 1.2.0 to 1.3.0.
Safety Rules
git/CLAUDE.md
Added "NEVER commit directly to mainline" constraint to the "Differences from built-in instructions" section.
Instruction Updates
git/scripts/git-instructions.sh
Rewrote parallel bash command execution guidance in commit and PR sections; changed forbidden tools from TodoWrite and Agent to TaskCreate, TaskUpdate, and Agent in both workflows.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • PR #29: Both PRs restore/add the "NEVER commit directly to mainline" protection and update git-instructions.sh in parallel.
  • PR #28: Both PRs bump the plugin version in plugin.json and modify git-instructions.sh for the same plugin release.
  • PR #7: Both PRs restrict TaskCreate and TaskUpdate tools; the related PR adds Task Coordination features to git skills while this PR forbids them in instruction workflows.

Poem

🐰 Version bumps and safety rules,
Mainline branches now have tools!
No more commits to the main,
TaskCreate stays in the lane,
Instructions reworded bright,
Git plugin v1.3 takes flight! 🚀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: aligning session hook output with upstream versions v2.1.84–v2.1.126, which encompasses version bumps, tool replacements, and documentation updates across multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/git-upstream-alignment-v2.1.126

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
git/scripts/git-instructions.sh (1)

195-199: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

"in parallel" on commit step 3 contradicts the sequential dependencies of all three sub-steps.

The three sub-steps are strictly ordered: git addcommitgit status. None of these can be parallelised. The existing note on line 199 acknowledges the commit→status dependency but doesn't cover the stage→commit dependency either. Adding "in parallel" to the header makes the instructions self-contradictory.

🐛 Proposed fix
-3. Run the following commands in parallel:
+3. Run the following commands sequentially:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@git/scripts/git-instructions.sh` around lines 195 - 199, The header "Run the
following commands in parallel" is incorrect; update it to indicate sequential
execution and clarify dependencies: change the header to something like "Run the
following commands sequentially" (or remove "in parallel"), and adjust the note
to state the strict ordering: first run `git add` to stage files, then `git
commit` with the Assisted-by trailer `Assisted-by: Claude:<your-model-id>`, and
only after the commit completes run `git status` to verify; ensure the text
references the three steps (`git add`, `git commit`, `git status`) so the
stage→commit and commit→status dependencies are explicit.
git/CLAUDE.md (1)

75-75: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Line 75 is now stale — tool references were replaced, not removed.

After this PR, git-instructions.sh still includes tool restriction lines (NEVER use the TaskCreate, TaskUpdate, or Agent tools / DO NOT use the TaskCreate, TaskUpdate, or Agent tools). Line 75 documenting these references as "removed" is no longer accurate.

📝 Suggested update
-- `TodoWrite or Agent tools` references removed (not relevant to plugin context)
+- `TodoWrite` replaced with `TaskCreate`/`TaskUpdate`; Agent tool restriction retained
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@git/CLAUDE.md` at line 75, Update the stale sentence that says "`TodoWrite or
Agent tools` references removed" to accurately reflect that those tool
references were replaced rather than removed; edit CLAUDE.md (the sentence at or
around line 75) to say the references were replaced/updated and add a note that
git-instructions.sh still contains the restriction lines "NEVER use the
TaskCreate, TaskUpdate, or Agent tools" and "DO NOT use the TaskCreate,
TaskUpdate, or Agent tools" so the documentation and git-instructions.sh remain
consistent.
🧹 Nitpick comments (1)
git/scripts/git-instructions.sh (1)

204-204: ⚡ Quick win

Coding guideline requires removing task-tool restrictions, not replacing them.

The guideline for git/**/git-instructions.sh states: "Remove TodoWrite or Agent tools references from git instructions as they are not relevant to plugin context." Both lines replace the deprecated TodoWrite reference with TaskCreate, TaskUpdate, or Agent rather than removing the restriction entirely, which violates the guideline.

If the intent is to keep the restriction with updated names, the guideline itself should be revised first. Otherwise, remove both lines:

✂️ Proposed removal (per guideline)
 Important notes:
 - NEVER run additional commands to read or explore code, besides git bash commands
-- NEVER use the TaskCreate, TaskUpdate, or Agent tools
 - DO NOT push to the remote repository unless the user explicitly asks you to do so
 Important:
-- DO NOT use the TaskCreate, TaskUpdate, or Agent tools
 - Return the PR URL when you're done, so the user can see it

As per coding guidelines: "Remove TodoWrite or Agent tools references from git instructions as they are not relevant to plugin context."

Also applies to: 246-246

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@git/scripts/git-instructions.sh` at line 204, Remove the restriction line
that reads "NEVER use the TaskCreate, TaskUpdate, or Agent tools" from
git-instructions.sh (and the identical occurrence noted at the other location)
so that no references to TodoWrite/TaskCreate/TaskUpdate/Agent remain in the git
instructions; simply delete those lines entirely to comply with the guideline
that task-tool references be removed rather than replaced.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@git/CLAUDE.md`:
- Line 75: Update the stale sentence that says "`TodoWrite or Agent tools`
references removed" to accurately reflect that those tool references were
replaced rather than removed; edit CLAUDE.md (the sentence at or around line 75)
to say the references were replaced/updated and add a note that
git-instructions.sh still contains the restriction lines "NEVER use the
TaskCreate, TaskUpdate, or Agent tools" and "DO NOT use the TaskCreate,
TaskUpdate, or Agent tools" so the documentation and git-instructions.sh remain
consistent.

In `@git/scripts/git-instructions.sh`:
- Around line 195-199: The header "Run the following commands in parallel" is
incorrect; update it to indicate sequential execution and clarify dependencies:
change the header to something like "Run the following commands sequentially"
(or remove "in parallel"), and adjust the note to state the strict ordering:
first run `git add` to stage files, then `git commit` with the Assisted-by
trailer `Assisted-by: Claude:<your-model-id>`, and only after the commit
completes run `git status` to verify; ensure the text references the three steps
(`git add`, `git commit`, `git status`) so the stage→commit and commit→status
dependencies are explicit.

---

Nitpick comments:
In `@git/scripts/git-instructions.sh`:
- Line 204: Remove the restriction line that reads "NEVER use the TaskCreate,
TaskUpdate, or Agent tools" from git-instructions.sh (and the identical
occurrence noted at the other location) so that no references to
TodoWrite/TaskCreate/TaskUpdate/Agent remain in the git instructions; simply
delete those lines entirely to comply with the guideline that task-tool
references be removed rather than replaced.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 307c8946-32fd-47ed-97e9-25b75c623209

📥 Commits

Reviewing files that changed from the base of the PR and between a0dc439 and cda3ce1.

📒 Files selected for processing (3)
  • git/.claude-plugin/plugin.json
  • git/CLAUDE.md
  • git/scripts/git-instructions.sh

@cblecker cblecker merged commit d2e683a into main May 2, 2026
8 checks passed
@cblecker cblecker deleted the chore/git-upstream-alignment-v2.1.126 branch May 2, 2026 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant